import { createRouter, createWebHistory } from 'vue-router'
import LoginViewVue from '@/views/LoginView.vue'
import ShoppingCategory from '@/components/ShoppingCategory.vue'
import shoppinglistpage from '@/views/ShoppingListPage.vue'
import swiper from '@/components/Swiper.vue'
import IndexView from '@/views/IndexView.vue'
import HeaderView from '@/components/HeaderView.vue'
import ShoppingChild from '@/components/ShoppingChild.vue'
import ServePage from '@/views/ServePage.vue'
const routes = [
  {
    path: '/serve',
    component: ServePage
  },
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/index',
    component: IndexView
  },
  {
    path: '/login',
    component: LoginViewVue,
    name: LoginViewVue
  },
  {
    path: '/shoppingcart',
    name: 'shoppingcart',
    component: ShoppingCategory
  },
  {
    path: '/shoppinglistpage',
    component: shoppinglistpage
  },
  {
    path: '/swiper',
    component: swiper
  },
  {
    path: '/test',
    component: HeaderView
  },
  {
    path: '/shoppingone',
    component: ShoppingChild
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
  mode: 'hash'
})

export default router
